package org.btik.light.server.platform.common.thread;

import org.btik.light.server.platform.common.api.ControlAble;

/***
 *循环常驻线程
 * */
public abstract class BaseControlAble extends Thread implements ControlAble {

    boolean runFlag = true;

    @Override
    public void run() {
        while (runFlag) {
            loop();
        }
    }

    @Override
    public void shutDown(String msg) {
        runFlag = false;
    }

    protected abstract void loop();

}
